package com.stephen.data.stack;

import java.util.Stack;

/**
 * @author: stephen
 * @create: 2020-01-30 14:15
 * @description: jdk的实现,直接可以用
 */
public class StackDemo {
    public static void main(String[] args) {
        Stack<String> stack = new Stack<String>();
        // 入栈
        stack.add("11");
        stack.add("22");
        stack.add("33");
        // 出栈
        while (stack.size() > 0) {
            String pop = stack.pop();
            System.out.println(pop);
        }
    }


}
